package com.test.model;



import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 采集器
 * @author zxw
 * create 2016年3月2日 下午8:14:19
 */
@Entity
@Table(name="rcc_e_collector")
public class Collector implements Serializable{
   private Integer uniqueId;
   private String serialNo;//编号
   private Integer port;//所在端口
   private String detailPosition;//详细位置
   private Date installDate;//安装日期
   private NetEqu netEqu;//所属网络设备
//   private InHousing inHousing;//所属小区
   private Model model;//型号
   private Station station;//换热站
   @Id
   @GeneratedValue
   @Column(name = "uniqueId", unique = true, nullable = false)
   public Integer getUniqueId() {
       return uniqueId;
   }
   @Column(name = "serialNo")
   public String getSerialNo() {
       return serialNo;
   }
   @Column(name = "port",  nullable = false)
   public Integer getPort() {
       return port;
   }
   @Column(name = "detailPosition")
   public String getDetailPosition() {
       return detailPosition;
   }
   @Column(name = "installDate")
   public Date getInstallDate() {
       return installDate;
   }
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "netEquId",nullable = false)
   public NetEqu getNetEqu() {
       return netEqu;
   }
//   @ManyToOne(fetch = FetchType.LAZY)
//   @JoinColumn(name = "inHousingId")
//  public InHousing getInHousing() {
//      return inHousing;
//   }
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "modelId",nullable = false)
   public Model getModel() {
       return model;
   }
   @ManyToOne(fetch = FetchType.LAZY)
   @JoinColumn(name = "stationId")
   public Station getStation() {
       return station;
   }
   public void setStation(Station station) {
       this.station = station;
   }
   public void setUniqueId(Integer uniqueId) {
       this.uniqueId = uniqueId;
   }
   public void setSerialNo(String serialNo) {
       this.serialNo = serialNo;
   }
   public void setPort(Integer port) {
       this.port = port;
   }
   public void setDetailPosition(String detailPosition) {
       this.detailPosition = detailPosition;
   }
   public void setInstallDate(Date installDate) {
       this.installDate = installDate;
   }
   public void setNetEqu(NetEqu netEqu) {
       this.netEqu = netEqu;
   }
//   public void setInHousing(InHousing inHousing) {
//       this.inHousing = inHousing;
//   }
   public void setModel(Model model) {
       this.model = model;
   }
}
